package com.lgc.javathread.threadPoolTest.threadproject;

import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2018/3/24.
 */
public class Program2 {
    public static void main(String[] args) {
        MyRunnable mr = new MyRunnable();   //4,创建Runnable的子类对象
        //Runnable target = mr; mr = 0x0011
        Thread t = new Thread(mr);      //5,将其当作参数传递给Thread的构造函数
        t.start();              //6,开启线程

        try {
            TimeUnit.MICROSECONDS.sleep(1000);

            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        for(int i = 0; i < 1000; i++) {
            System.out.println("bb");
        }



    }
}
